import api from '@/api/index'

/**
 *	根据当前登录人获取场站下拉框
 */
export function getStationSelect() {
	let orgId = getUserInfo().deptId;
	let administratorSign = getUserInfo().administratorSign;
	return new Promise((resolve, reject) => {
		api.get('/initStation/' + orgId + '/' + administratorSign).then(data => {
			if(data){
				resolve(data);
			}
		}).catch(err =>{
            reject(err.data)
        })
    });
}

/**
 *	获取登陆人信息
 */
export function getUserInfo(){
	return JSON.parse(sessionStorage.getItem('userInfo'));
}
